/*
 *  $Id: Wrath.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Earth.Spells {
    public class Wrath: TargetEnchantmentCard<Creature> {
        public Wrath(): base("001_e_s_wrath") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Earth;
            Value = 100;
            Target = new CreatureTarget(GetTargetPhrase(), true, true, IsNotDarkness);
            AddManaCost(ElementType.Earth, 2);
        }

        private static bool IsNotDarkness(TargetRequest request, Creature cr) {
            return cr.Card.Element != ElementType.Darkness;
        }

        protected override EnchantmentAffect CreateEnchantment() {
            return new WrathAffect();
        }

        private class WrathAffect: EnchantmentAffect<Wrath> {
            public WrathAffect() {
                TimeAffect time = new TimeAffect(4);
                time.Add(new Affects.ModMaxHealth(-1));
                time.Add(new Affects.Brutal());
                Add(time);
            }
        }
    }
}
